#ifndef __SANGAME_HISTORY_INDICATOR_GOODS_H__
#define __SANGAME_HISTORY_INDICATOR_GOODS_H__

#include "HistoryIndicatorBase.h"
#include "HistoryData.h"

class CKLineBase;

class CHistoryIndicatorGoods : public CHistoryIndicatorBase {
public:
	CHistoryIndicatorGoods(SGHandle owner_handle);
	~CHistoryIndicatorGoods();

	BOOL OnSGInitContext(SGContext* context_param);
	BOOL OnSGGoodsChange(SGGoodsChange* goods_change_param);
	BOOL OnSGSyncData(SGRange<uint64_t>* range_param);
	BOOL OnSGDrawBack(SGCanvas* canvas_param);
	BOOL OnSGDrawFore(SGCanvas* canvas_param);

#pragma region SG Event

	void OnDataUpdate();

#pragma endregion

private:
	int m_nGoods;
	int m_nGoodsIndex;
	std::shared_ptr<CHistoryData> m_pData;
	std::vector<std::shared_ptr<CKLineBase>> m_vtLine;
};

#endif // __SANGAME_HISTORY_INDICATOR_GOODS_H__